
if (!!foo || bar) {
  //...
}

while (!!foo && bar) {
  //...
}

if ((!!foo || bar) && !!baz) {
  //...
}

const foo = new Boolean(!!bar || baz);

foo && Boolean(bar) ? baz : bat;

const nullishCoalescingOperator = Boolean(bar ?? Boolean(baz));

// another comma operator example
for (let i = 0; console.log(i), Boolean(i < 10); i++) {
  // ...
}
if (!!foo || bar) {
  //...
}

while (!!foo && bar) {
  //...
}

if ((!!foo || bar) && baz) {
  //...
}

foo && Boolean(bar) ? baz : bat

var coo = new Boolean(!!bar || baz)

if (!!foo || bar) {}
// output: if (foo || bar) {}

if (!!foo && bar) {}
// output: if (foo && bar) {}

if ((!!foo || bar) && bat) {}
// output: if ((foo || bar) && bat) {}

if (foo && !!bar) {}
// output: if (foo && bar) {}

do {} while (!!foo || bar)
// output: do {} while (foo || bar)

while (!!foo || bar) {}
// output: while (foo || bar) {}